package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetScrapDetail;
import com.ruoyi.ams.mapper.AmsAssetScrapDetailMapper;
import com.ruoyi.ams.service.IAmsAssetScrapDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 清理报废明细Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetScrapDetailServiceImpl extends ServiceImpl<AmsAssetScrapDetailMapper, AmsAssetScrapDetail>  implements IAmsAssetScrapDetailService
{
    @Autowired
    private AmsAssetScrapDetailMapper amsAssetScrapDetailMapper;

    /**
     * 查询清理报废明细
     * 
     * @param scrapDetailId 清理报废明细主键
     * @return 清理报废明细
     */
    @Override
    public AmsAssetScrapDetail selectAmsAssetScrapDetailByScrapDetailId(Long scrapDetailId)
    {
        return amsAssetScrapDetailMapper.selectAmsAssetScrapDetailByScrapDetailId(scrapDetailId);
    }

    /**
     * 查询清理报废明细列表
     * 
     * @param amsAssetScrapDetail 清理报废明细
     * @return 清理报废明细
     */
    @Override
    public List<AmsAssetScrapDetail> selectAmsAssetScrapDetailList(AmsAssetScrapDetail amsAssetScrapDetail)
    {
        return amsAssetScrapDetailMapper.selectAmsAssetScrapDetailList(amsAssetScrapDetail);
    }

    /**
     * 新增清理报废明细
     * 
     * @param amsAssetScrapDetail 清理报废明细
     * @return 结果
     */
    @Override
    public int insertAmsAssetScrapDetail(AmsAssetScrapDetail amsAssetScrapDetail)
    {
        return amsAssetScrapDetailMapper.insertAmsAssetScrapDetail(amsAssetScrapDetail);
    }

    /**
     * 修改清理报废明细
     * 
     * @param amsAssetScrapDetail 清理报废明细
     * @return 结果
     */
    @Override
    public int updateAmsAssetScrapDetail(AmsAssetScrapDetail amsAssetScrapDetail)
    {
        return amsAssetScrapDetailMapper.updateAmsAssetScrapDetail(amsAssetScrapDetail);
    }

    /**
     * 批量删除清理报废明细
     * 
     * @param scrapDetailIds 需要删除的清理报废明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetScrapDetailByScrapDetailIds(Long[] scrapDetailIds)
    {
        return amsAssetScrapDetailMapper.deleteAmsAssetScrapDetailByScrapDetailIds(scrapDetailIds);
    }

    /**
     * 删除清理报废明细信息
     * 
     * @param scrapDetailId 清理报废明细主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetScrapDetailByScrapDetailId(Long scrapDetailId)
    {
        return amsAssetScrapDetailMapper.deleteAmsAssetScrapDetailByScrapDetailId(scrapDetailId);
    }
}
